import React from "react";
import { CardContainer } from "./CardText.style"
const CardText = (props) => {

    const { setShopcarDisplay } = props;
    console.log(setShopcarDisplay);
    const { datas = {} } = props.datas
    // console.log(datas)
    // console.log(datas.desc, datas.show, datas.title)
    // const checkproduct=()=>{

    // }
    const checkproducts = () => {
        setShopcarDisplay(1);
    }
    return (
        <CardContainer >
            <div className="cardContain">

                <div className="showInfo">
                    <div className="show">{datas.show}</div>
                    <div className="text">{datas.title}  |  {datas.desc}</div>
                    <div className="price">
                        <div className="money">
                            {datas.prc}
                        </div>
                        <div className="mid">|</div>
                        <div className="integral">{datas.prc * 10}</div>
                    </div>
                </div>
                <div className="showdetails" onClick={checkproducts}>
                    <div className="details_left">规格</div>
                    <div className="details_right" >
                        <div className="checkmore">选择商品规格</div>
                        <div className="box_border"></div>
                    </div>

                </div>
                <div className="showdetails">
                    <div className="details_left">支持配送区域</div>
                    <div className="details_right">
                        <div className="checkmore"></div>
                        <div className="box_border"></div>
                    </div>
                </div>
                <div className="showdetails">
                    <div className="details_left">售后政策</div>
                    <div className="details_right">
                        <div className="checkmore">查看更多</div>
                        <div className="box_border"></div>
                    </div>
                </div>
            </div>
        </CardContainer>
    )
}
export default CardText